package com.yonyou.cyxdms.basedata.service.controller.code;

import com.yonyou.cyxdms.basedata.client.domains.vo.CodeVO;
import com.yonyou.cyxdms.basedata.service.service.code.CodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * tc_code查询
 *
 * @author: renwd
 * @since: 2018/11/21
 * @version:1.0 Copyright: Copyright (c) 2018
 */

@RestController
public class CyxCodeController {

    @Autowired
    private CodeService codeService;

    /**
     * queryCodeByType
     *
     * @param type
     * @return java.util.List<com.yonyou.cyx.base.bean.dto.CodeDto>
     * @author renwd
     * @since 2018/11/22
     */
    @GetMapping("/queryCodeByType")
    public List<CodeVO> queryCode(@RequestParam("type") String type) {
        return codeService.queryCode(type);
    }

}
